Version

CreateComparer<T>(IComparer) Method

If the specified comparer is IComparer<T> then returns it otherwise creates an IComparer<T> that wraps the specified IComparer.
Syntax
public static IComparer<T> CreateComparer<T>( 
   IComparer comparer
)

Parameters

comparer
Non-generic comparer.

Type Parameters

T
The type of object being compared

Return Value

A new IComparer<T> that uses the specified IComparer to perform the comparison.
Requirements

Target Platforms: Android 4.4+, iOS 8+

Development Environments: Visual Studio 2015+, Visual Studio for Mac Preview, Xamarin for Visual Studio 4.2+

See Also